package com.laizhenghua.share.order.controller;

import com.laizhenghua.share.common.core.domain.R;
import com.laizhenghua.share.order.api.domain.entity.OrderInfo;
import com.laizhenghua.share.order.service.OrderInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @Description
 * @Author laizh
 * @Date 2025/10/27 22:04
 **/
@Tag(name = "订单API")
@RestController
@RequestMapping("/order-info")
public class OrderInfoController {
    private final OrderInfoService orderInfoService;

    @Autowired
    public OrderInfoController(OrderInfoService orderInfoService) {
        this.orderInfoService = orderInfoService;
    }

    @Operation(summary = "获取未完成的的订单")
    @GetMapping("/find/not-finish")
    public R<OrderInfo> findNotFinishOrder() {
        return orderInfoService.findNotFinishOrder();
    }
}
